<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class CartItem extends Model
{
    use HasFactory;

    protected $fillable = ["amount","price","rating","review","reviewed_at"];
    protected $dates = ["reviewed_at"];

    public $timestamps = false;

    public function product(){
        return $this->belongsTo(Product::class);
    }

    public function user(){
        return  $this->belongsTo(User::class);
    }

    public function productSku(){
        return $this->belongsTo(ProductSku::class);
    }

    public function order(){
        return $this->belongsTo(Order::class);
    }
}
